﻿import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class FileReader {
	public static void main(String[] args) {
		Reader fr=null;
		StringBuffer sb = null;
		
		try {
			fr=new FileReader("d://简介.txt");
			sb=new StringBuffer();
			char[] words=new char[1024];//存储读取到的字符

			int len=fr.read(words);//读取到字符数组

			while((len!=-1)){
				sb.append(words);
				len=fr.read();
				System.out.println(words);
			}
			
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block

			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block

			e.printStackTrace();
		}finally{
			if(fr!=null){
				try {
					fr.close();
				} catch (IOException e) {
					// TODO Auto-generated catch block

					e.printStackTrace();
				}
			}
		}
		
	}
}